#include <sys.h>

#define EI() asm(" ei")
#define DI() asm(" di")

extern unsigned int jiffy;

typedef unsigned int  uint;
typedef unsigned long ulong;
typedef unsigned short ushort;


void bordercolor (char color);
unsigned char readstatusreg();


void vdpsetvramwr(uint address, char bit16);
void vdpsetvramrd(uint address, char bit16);
void setpage(char page);


void fillvram(uint address, unsigned char page, unsigned char value, uint bytecount);

void scr(char mode);
void init_screen(void);

void setstatusreg(unsigned char regno);
void vpoke (uint address, char page, unsigned char value);
unsigned char vpeek (uint address, unsigned char page);


unsigned char waitkey(void);
